#include <asm/asm.h>
#include <asm/regdef.h>
#include <cpu.h>
#include <asm/context.h>
#include <inst_ex_test.h>

####LEAF(n63_lw_ex_test)
    .globl n63_lw_ex_test
n63_lw_ex_test:
    .set noreorder
    li  a0, 0x3F
###test inst
    TEST_LW_EX(0xb27f9788, 0x3958f252, 0x8010759c, 0x00008845, 0x00008844, 0x8011759c, 0x8010fde1)
    TEST_LW_EX(0x5077f320, 0x15148a4c, 0x80100704, 0x0000e53f, 0x0000e53c, 0x80110704, 0x8010ec43)
    TEST_LW_EX(0x0f9edafa, 0xdd064458, 0x80105bac, 0x0000003e, 0x0000003c, 0x0f9edafa, 0x80105bea)
    TEST_LW_EX(0xe2b0a2c0, 0x7423d85f, 0x80107748, 0x00004973, 0x00004970, 0xe2b0a2c0, 0x8010c0bb)
    TEST_LW_EX(0x94a1ade4, 0x68929b5c, 0x801059dc, 0x00007cee, 0x00007cec, 0x94a1ade4, 0x8010d6ca)
    TEST_LW_EX(0x3101bbec, 0xc0442bd0, 0x80107748, 0x00000ea2, 0x00000ea0, 0x3101bbec, 0x801085ea)
    TEST_LW_EX(0x22a4ba3c, 0x5b21b7ec, 0x80100da8, 0x00008cb6, 0x00008cb4, 0x80110da8, 0x80109a5e)
    TEST_LW_EX(0x3be86388, 0x6e1e28c8, 0x80105798, 0x0000058a, 0x00000588, 0x3be86388, 0x80105d22)
    TEST_LW_EX(0xd89e86c0, 0x96263a34, 0x80100f50, 0x00001a0a, 0x00001a08, 0xd89e86c0, 0x8010295a)
    TEST_LW_EX(0x31ce52a8, 0x6d32e780, 0x80108024, 0x00002dea, 0x00002de8, 0x31ce52a8, 0x8010ae0e)
    TEST_LW_EX(0x42590f20, 0x74b59878, 0x80106bb8, 0x00002567, 0x00002564, 0x42590f20, 0x8010911f)
    TEST_LW_EX(0xb57f455e, 0xe28b1ea0, 0x8010ce84, 0x000000b7, 0x000000b4, 0xb57f455e, 0x8010cf3b)
    TEST_LW_EX(0xfc2f5190, 0x53115493, 0x80100ca0, 0x00004306, 0x00004304, 0xfc2f5190, 0x80104fa6)
    TEST_LW_EX(0x374cd420, 0xf09cb1e8, 0x80106300, 0x00008629, 0x00008628, 0x80116300, 0x8010e929)
    TEST_LW_EX(0x8e187e40, 0x76667638, 0x80102384, 0x0000af55, 0x0000af54, 0x80112384, 0x8010d2d9)
    TEST_LW_EX(0xac209628, 0x3fa01e10, 0x801056a0, 0x00007f9d, 0x00007f9c, 0xac209628, 0x8010d63d)
    TEST_LW_EX(0xa24a2540, 0x8fc1299a, 0x801057c0, 0x00006b46, 0x00006b44, 0xa24a2540, 0x8010c306)
    TEST_LW_EX(0xcd040600, 0x2c9d7900, 0x8010d3dc, 0x00002773, 0x00002770, 0xcd040600, 0x8010fb4f)
    TEST_LW_EX(0xa8eb7e2c, 0x5de40140, 0x8010243c, 0x0000d40a, 0x0000d408, 0x8011243c, 0x8010f846)
    TEST_LW_EX(0x7faab588, 0xde551cc2, 0x801017e8, 0x0000355b, 0x00003558, 0x7faab588, 0x80104d43)
    TEST_LW_EX(0x3fee8410, 0xfb87e278, 0x80105adc, 0x00005d7b, 0x00005d78, 0x3fee8410, 0x8010b857)
    TEST_LW_EX(0x2480ae19, 0x2f2b6c00, 0x8010a8f4, 0x0000057b, 0x00000578, 0x2480ae19, 0x8010ae6f)
    TEST_LW_EX(0x77891f60, 0x9119bc40, 0x80101000, 0x00004ef6, 0x00004ef4, 0x77891f60, 0x80105ef6)
    TEST_LW_EX(0x6dae253a, 0x2110c666, 0x8010987c, 0x000014d6, 0x000014d4, 0x6dae253a, 0x8010ad52)
    TEST_LW_EX(0x2ccf22b0, 0xb3081c68, 0x80104e98, 0x00001096, 0x00001094, 0x2ccf22b0, 0x80105f2e)
    TEST_LW_EX(0x5e990f41, 0x32be5270, 0x80105200, 0x00000a79, 0x00000a78, 0x5e990f41, 0x80105c79)
    TEST_LW_EX(0x72571809, 0x998d83a8, 0x80106ce4, 0x00001822, 0x00001820, 0x72571809, 0x80108506)
    TEST_LW_EX(0xf170b230, 0xdd28214b, 0x80107e60, 0x000032f2, 0x000032f0, 0xf170b230, 0x8010b152)
    TEST_LW_EX(0x15ed1880, 0xe6940092, 0x8010a198, 0x000007b5, 0x000007b4, 0x15ed1880, 0x8010a94d)
    TEST_LW_EX(0x23393d38, 0xb96ced30, 0x80100000, 0x00001aa1, 0x00001aa0, 0x23393d38, 0x80101aa1)
    TEST_LW_EX(0x470b0301, 0xd16a4518, 0x80100000, 0x000026a2, 0x000026a0, 0x470b0301, 0x801026a2)
    TEST_LW_EX(0x0cdbaeb7, 0xe51f9be0, 0x80100000, 0x00000be2, 0x00000be0, 0x0cdbaeb7, 0x80100be2)
    TEST_LW_EX(0xf1759c2c, 0xa1f2b0c8, 0x80100000, 0x0000f2c1, 0x0000f2c0, 0x80110000, 0x8010f2c1)
    TEST_LW_EX(0x2d37c0c4, 0xd728276f, 0x80100000, 0x0000abbb, 0x0000abb8, 0x80110000, 0x8010abbb)
    TEST_LW_EX(0x23200348, 0x17ec3d70, 0x80100000, 0x00003e1b, 0x00003e18, 0x23200348, 0x80103e1b)
    TEST_LW_EX(0x873f5180, 0xb78c5aa0, 0x80100000, 0x0000c711, 0x0000c710, 0x80110000, 0x8010c711)
    TEST_LW_EX(0xb428eb2a, 0xbd7877d4, 0x80100000, 0x00002ccb, 0x00002cc8, 0xb428eb2a, 0x80102ccb)
    TEST_LW_EX(0xbbe87600, 0x55d82c50, 0x80100000, 0x0000cce9, 0x0000cce8, 0x80110000, 0x8010cce9)
    TEST_LW_EX(0x40588120, 0x5038e1d0, 0x80100000, 0x00009e7f, 0x00009e7c, 0x80110000, 0x80109e7f)
    TEST_LW_EX(0x1150e768, 0x18f2ab0d, 0x80100000, 0x000017c7, 0x000017c4, 0x1150e768, 0x801017c7)
    TEST_LW_EX(0xf461e3e0, 0x63cb368f, 0x80100000, 0x0000da92, 0x0000da90, 0x80110000, 0x8010da92)
    TEST_LW_EX(0x955ddb0e, 0x7da4a77c, 0x80100000, 0x0000c7bd, 0x0000c7bc, 0x80110000, 0x8010c7bd)
    TEST_LW_EX(0x94b4bfbc, 0x0bc0b9fb, 0x80100000, 0x0000b49e, 0x0000b49c, 0x80110000, 0x8010b49e)
    TEST_LW_EX(0x5ff02595, 0x36bc74d8, 0x80100000, 0x00007509, 0x00007508, 0x5ff02595, 0x80107509)
    TEST_LW_EX(0x3a3b1b00, 0xb3db96f2, 0x80100000, 0x000048a7, 0x000048a4, 0x3a3b1b00, 0x801048a7)
    TEST_LW_EX(0xecbff710, 0xed413050, 0x80100000, 0x00004126, 0x00004124, 0xecbff710, 0x80104126)
    TEST_LW_EX(0xe1f95c40, 0xcc9beb24, 0x80100000, 0x00001dc9, 0x00001dc8, 0xe1f95c40, 0x80101dc9)
    TEST_LW_EX(0xf76d97c0, 0x545ea6c0, 0x80100000, 0x000092e6, 0x000092e4, 0x80110000, 0x801092e6)
    TEST_LW_EX(0x3c4f47ce, 0xb8593624, 0x80100000, 0x00006386, 0x00006384, 0x3c4f47ce, 0x80106386)
    TEST_LW_EX(0xd27e1580, 0x6fbc1290, 0x80100000, 0x000070f6, 0x000070f4, 0xd27e1580, 0x801070f6)
    TEST_LW_EX(0x0bff298c, 0x1effd45b, 0x80100000, 0x0000ffa2, 0x0000ffa0, 0x80110000, 0x8010ffa2)
    TEST_LW_EX(0xf5a1788a, 0x3789625b, 0x80100000, 0x00001e12, 0x00001e10, 0xf5a1788a, 0x80101e12)
    TEST_LW_EX(0x65a69ecc, 0x62585e72, 0x80100000, 0x0000d51b, 0x0000d518, 0x80110000, 0x8010d51b)
    TEST_LW_EX(0x5017b9cc, 0xd84e868c, 0x80110000, 0x00000003, 0x00000000, 0x5017b9cc, 0x80110003)
    TEST_LW_EX(0x32f8ff00, 0x0dbfea24, 0x80110000, 0x00000003, 0x00000000, 0x32f8ff00, 0x80110003)
    TEST_LW_EX(0x60ef8e16, 0x8be8a170, 0x80110000, 0x00000001, 0x00000000, 0x60ef8e16, 0x80110001)
    TEST_LW_EX(0xcf1de7da, 0x81bbd600, 0x80110000, 0x00000002, 0x00000000, 0xcf1de7da, 0x80110002)
    TEST_LW_EX(0x061b3b04, 0xf3f69300, 0x80110000, 0x00000003, 0x00000000, 0x061b3b04, 0x80110003)
    TEST_LW_EX(0x3fb56660, 0x632e9918, 0x80110000, 0x00000002, 0x00000000, 0x3fb56660, 0x80110002)
    TEST_LW_EX(0xd2e45f60, 0x201d1f58, 0x80110000, 0x00000003, 0x00000000, 0xd2e45f60, 0x80110003)
    TEST_LW_EX(0x0cb2a658, 0x29559288, 0x80110000, 0x00000002, 0x00000000, 0x0cb2a658, 0x80110002)
    TEST_LW_EX(0x7885f510, 0x26329f80, 0x80110000, 0x00000001, 0x00000000, 0x7885f510, 0x80110001)
    TEST_LW_EX(0x1690ff00, 0xb750c948, 0x80110000, 0x00000003, 0x00000000, 0x1690ff00, 0x80110003)
    TEST_LW_EX(0xe546ff6a, 0xbf841710, 0x80110000, 0x00000002, 0x00000000, 0xe546ff6a, 0x80110002)
    TEST_LW_EX(0x6d0df410, 0xe0e01918, 0x80110000, 0x00000003, 0x00000000, 0x6d0df410, 0x80110003)
    TEST_LW_EX(0xb2dbb778, 0xf2ae1f1c, 0x80110000, 0x00000002, 0x00000000, 0xb2dbb778, 0x80110002)
    TEST_LW_EX(0x076d5890, 0xd7864b92, 0x80110000, 0x00000003, 0x00000000, 0x076d5890, 0x80110003)
    TEST_LW_EX(0xd80f0a28, 0xb183218c, 0x80110000, 0x00000001, 0x00000000, 0xd80f0a28, 0x80110001)
    TEST_LW_EX(0x551a2d16, 0x504fe680, 0x80110000, 0x00000002, 0x00000000, 0x551a2d16, 0x80110002)
    TEST_LW_EX(0xd57f196e, 0x70369d92, 0x80110000, 0x00000003, 0x00000000, 0xd57f196e, 0x80110003)
    TEST_LW_EX(0x3ce7ee4c, 0xbae50462, 0x80110000, 0x00000002, 0x00000000, 0x3ce7ee4c, 0x80110002)
    TEST_LW_EX(0xaaf41646, 0x2b0869c8, 0x80110000, 0x00000001, 0x00000000, 0xaaf41646, 0x80110001)
    TEST_LW_EX(0xe6f9d9fc, 0xb297bc20, 0x80110000, 0x00000001, 0x00000000, 0xe6f9d9fc, 0x80110001)
    TEST_LW_EX(0x9706463c, 0xcd3205b4, 0x80110000, 0x00000002, 0x00000000, 0x9706463c, 0x80110002)
    TEST_LW_EX(0xc423e170, 0x6c1ffd40, 0x80110000, 0x00000002, 0x00000000, 0xc423e170, 0x80110002)
    TEST_LW_EX(0xab592b4c, 0xd5956788, 0x80110000, 0x00000003, 0x00000000, 0xab592b4c, 0x80110003)
    TEST_LW_EX(0x242c9dc0, 0xdd839be2, 0x80110000, 0x00000002, 0x00000000, 0x242c9dc0, 0x80110002)
    TEST_LW_EX(0x7fe606b0, 0x6ab21a10, 0x80110000, 0x00000002, 0x00000000, 0x7fe606b0, 0x80110002)
    TEST_LW_EX(0x7a8f8fe0, 0xbd4e3ccc, 0x80110000, 0x00000002, 0x00000000, 0x7a8f8fe0, 0x80110002)
    TEST_LW_EX(0x1ff665d6, 0x5b370180, 0x80110000, 0x00000001, 0x00000000, 0x1ff665d6, 0x80110001)
    TEST_LW_EX(0x6c0094d8, 0x1db0ba5a, 0x80110000, 0x00000001, 0x00000000, 0x6c0094d8, 0x80110001)
    TEST_LW_EX(0x81429a04, 0xbc524d3f, 0x80110000, 0x00000003, 0x00000000, 0x81429a04, 0x80110003)
    TEST_LW_EX(0x4d8c4fa0, 0x71945ef8, 0x80110000, 0x00000002, 0x00000000, 0x4d8c4fa0, 0x80110002)
    TEST_LW_EX(0xe23831f0, 0x7f3d6358, 0x80110000, 0x00000002, 0x00000000, 0xe23831f0, 0x80110002)
    TEST_LW_EX(0x95c9c2d8, 0xbb4000ab, 0x80110000, 0x00000001, 0x00000000, 0x95c9c2d8, 0x80110001)
    TEST_LW_EX(0x2e90a7c4, 0x33c41b0f, 0x80110000, 0x00000002, 0x00000000, 0x2e90a7c4, 0x80110002)
    TEST_LW_EX(0xe467635c, 0x70c76818, 0x80110000, 0x00000002, 0x00000000, 0xe467635c, 0x80110002)
    TEST_LW_EX(0xaa69ac8c, 0xdb1a8ec6, 0x80110000, 0x00000002, 0x00000000, 0xaa69ac8c, 0x80110002)
    TEST_LW_EX(0x8e533ab6, 0xaf265cd0, 0x80110000, 0x00000001, 0x00000000, 0x8e533ab6, 0x80110001)
    TEST_LW_EX(0x14fdbdfb, 0x649decc0, 0x80110000, 0x00000002, 0x00000000, 0x14fdbdfb, 0x80110002)
    TEST_LW_EX(0x53e125e8, 0x405ebc10, 0x80110000, 0x00000003, 0x00000000, 0x53e125e8, 0x80110003)
    TEST_LW_EX(0xb0b6e8c0, 0xa883d480, 0x80110000, 0x00000003, 0x00000000, 0xb0b6e8c0, 0x80110003)
    TEST_LW_EX(0xadf74012, 0x1ba31354, 0x80110000, 0x00000002, 0x00000000, 0xadf74012, 0x80110002)
    TEST_LW_EX(0x99c7c91e, 0x05ed6abd, 0x80110000, 0x00000002, 0x00000000, 0x99c7c91e, 0x80110002)

###detect exception
###score ++
    addiu s3, s3, 1
###output a0|s3
inst_error:
    sw s3, 0($23)
    sw a0, 0(s1)
    jr ra
    nop
####END(n63_lw_ex_test)
